
*Replication data for "Elite-Public Gaps on Nuclear Weapons: The Role of Salience and Knowledge"

*Summary statistics across samples (Appendix Table A1)
sum age if elite==1 & uscitizen==1, detail
sum age if public==1 & gc==1 & postukraine==0, detail
sum age if public==1 & gc==1 & postukraine==1, detail

tab gender if elite==1 & uscitizen==1
tab gender if public==1 & gc==1 & postukraine==0
tab gender if public==1 & gc==1 & postukraine==1

tab education if elite==1 & uscitizen==1
tab education if public==1 & gc==1 & postukraine==0
tab education if public==1 & gc==1 & postukraine==1

tab politics if elite==1 & uscitizen==1
tab politics if public==1 & gc==1 & postukraine==0
tab politics if public==1 & gc==1 & postukraine==1

tab race if elite==1 & uscitizen==1
tab race if public==1 & gc==1 & postukraine==0
tab race if public==1 & gc==1 & postukraine==1

tab nukeknowledge if elite==1 & uscitizen==1
tab nukeknowledge if public==1 & gc==1 & postukraine==0
tab nukeknowledge if public==1 & gc==1 & postukraine==1

sum highknowledge if elite==1 & uscitizen==1, detail
sum highknowledge if public==1 & gc==1 & postukraine==0, detail
sum highknowledge if public==1 & gc==1 & postukraine==1, detail

sum lowknowledge if elite==1 & uscitizen==1, detail
sum lowknowledge if public==1 & gc==1 & postukraine==0, detail
sum lowknowledge if public==1 & gc==1 & postukraine==1, detail

sum favordeathpenalty if elite==1 & uscitizen==1, detail
sum favordeathpenalty if public==1 & gc==1 & postukraine==0, detail
sum favordeathpenalty if public==1 & gc==1 & postukraine==1, detail

sum prefertroops100 if elite==1 & uscitizen==1, detail
sum prefertroops100 if public==1 & gc==1 & postukraine==0, detail
sum prefertroops100 if public==1 & gc==1 & postukraine==1, detail

sum approvetroops100 if elite==1 & uscitizen==1, detail
sum approvetroops100 if public==1 & gc==1 & postukraine==0, detail
sum approvetroops100 if public==1 & gc==1 & postukraine==1, detail

sum prefernukes100 if elite==1 & uscitizen==1, detail
sum prefernukes100 if public==1 & gc==1 & postukraine==0, detail
sum prefernukes100 if public==1 & gc==1 & postukraine==1, detail

sum approvenukes100 if elite==1 & uscitizen==1, detail
sum approvenukes100 if public==1 & gc==1 & postukraine==0, detail
sum approvenukes100 if public==1 & gc==1 & postukraine==1, detail

*Comparing preference and approval for nuclear use between elite sample and low salience (pre-Ukraine) public sample (Figure 2)
mean prefernukes100, over(samplecodes), if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)
test [ prefernukes100 ]elite= [ prefernukes100 ]public
mean approvenukes100, over(samplecodes), if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)
test [ approvenukes100 ]elite= [ approvenukes100 ]public
graph bar prefernukes100 approvenukes100 if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1), over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))

*Comparing preference for nuclear use between elite sample and low salience (pre-Ukraine) public sample across inferiority and superiority balance conditions (Figure 3A ATE)
mean prefernukes100, over(samplecodes fullnuclearbalance), if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_2
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_3
test [ prefernukes100 ]_subpop_3= [ prefernukes100 ]_subpop_4
test [ prefernukes100 ]_subpop_2= [ prefernukes100 ]_subpop_4
graph bar prefernukes100 if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1), over(fullnuclearbalance) over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))

*Comparing preference for nuclear use between elite sample and low salience (pre-Ukraine) public sample across inferiority and superiority balance conditions (Figure 3B ITT)
mean prefernukes100, over(samplecodes vignette), if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_2
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_3
test [ prefernukes100 ]_subpop_3= [ prefernukes100 ]_subpop_4
test [ prefernukes100 ]_subpop_2= [ prefernukes100 ]_subpop_4
graph bar prefernukes100 if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1), over(vignette) over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))

*Comparing preference for nuclear use between elite sample and low salience (pre-Ukraine) public sample across inferiority and superiority balance conditions only with successful manipulation check pass (Appendix ATE)
mean prefernukes100, over(samplecodes fullnuclearbalance), if ((public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)) & ((fullnuclearbalance==2 & vignette==2) | (fullnuclearbalance==4 & vignette==4))
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_2
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_3
test [ prefernukes100 ]_subpop_3= [ prefernukes100 ]_subpop_4
test [ prefernukes100 ]_subpop_2= [ prefernukes100 ]_subpop_4
graph bar prefernukes100 if ((public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)) & fullnuclearbalance==vignette, over(fullnuclearbalance) over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))

*Comparing preference for nuclear use between elite sample and low salience (pre-Ukraine) public sample across inferiority and superiority balance conditions only with successful manipulation check pass (Appendix ITT)
mean prefernukes100, over(samplecodes vignette), if ((public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)) & ((fullnuclearbalance==2 & vignette==2) | (fullnuclearbalance==4 & vignette==4))
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_2
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_3
test [ prefernukes100 ]_subpop_3= [ prefernukes100 ]_subpop_4
test [ prefernukes100 ]_subpop_2= [ prefernukes100 ]_subpop_4
graph bar prefernukes100 if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1), over(vignette) over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))

*Google searches for "nuclear weapons" and "potassium iodide" Jan 2019-Jan 2024 using imported data from Google Trends (Figure 4)
*Import Google data for "nuclear weapons"
twoway line nuclearweapons date, lcolor(black) bgcolor(white) graphregion(fcolor(white)) tline(3dec2020) tline(27oct2023)

*Import Google data for "potassium iodide"
twoway line potassiumiodide date, lcolor(black) bgcolor(white) graphregion(fcolor(white)) tline(3dec2020) tline(27oct2023)

*Comparing preference and approval for nuclear use between low salience (pre-Ukraine) and high salience (post-Ukraine) public samples (Figure 5)
reg prefernukes100 postukraine if public==1 & gc==1
reg approvenukes100 postukraine if public==1 & gc==1
graph bar prefernukes100 approvenukes100 if public==1 & gc==1, over(postukraine) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))

*Comparing support for nuclear use across all four balance conditions in low salience post-Ukraine public sample using manipulation check ATE (Figure 6A)
graph bar prefernukes100 approvenukes100 if public==1 & gc==1 & postukraine==1, over(fullnuclearbalance) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))
reg prefernukes100 ib1.fullnuclearbalance if public==1 & gc==1 & postukraine==1, r
reg prefernukes100 ib2.fullnuclearbalance if public==1 & gc==1 & postukraine==1, r
reg prefernukes100 ib3.fullnuclearbalance if public==1 & gc==1 & postukraine==1, r
reg prefernukes100 ib4.fullnuclearbalance if public==1 & gc==1 & postukraine==1, r
reg approvenukes100 ib1.fullnuclearbalance if public==1 & gc==1 & postukraine==1, r
reg approvenukes100 ib2.fullnuclearbalance if public==1 & gc==1 & postukraine==1, r
reg approvenukes100 ib3.fullnuclearbalance if public==1 & gc==1 & postukraine==1, r
reg approvenukes100 ib4.fullnuclearbalance if public==1 & gc==1 & postukraine==1, r

*Comparing support for nuclear use across all four balance conditions in low salience post-Ukraine public sample using vignette exposure ITT (Figure 6B)
graph bar prefernukes100 approvenukes100 if public==1 & gc==1 & postukraine==1, over(vignette) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))
reg prefernukes100 ib1.vignette if public==1 & gc==1 & postukraine==1, r
reg prefernukes100 ib2.vignette if public==1 & gc==1 & postukraine==1, r
reg prefernukes100 ib3.vignette if public==1 & gc==1 & postukraine==1, r
reg prefernukes100 ib4.vignette if public==1 & gc==1 & postukraine==1, r
reg approvenukes100 ib1.vignette if public==1 & gc==1 & postukraine==1, r
reg approvenukes100 ib2.vignette if public==1 & gc==1 & postukraine==1, r
reg approvenukes100 ib3.vignette if public==1 & gc==1 & postukraine==1, r
reg approvenukes100 ib4.vignette if public==1 & gc==1 & postukraine==1, r

*Google Ngram corpus proportion containing "nuclear weapons" and "nuclear" war, 1940-2019 using Ngram dataset (Figure 7)
*Import Google Ngram data
twoway line nuclearweapons nuclearwar year, lcolor(black) bgcolor(white) graphregion(fcolor(white)) 

*Comparing preference for nuclear use within public samples between high and low knowledge groups and across U.S. superiority and inferiority conditions using manipulation check ATE (Figure 8A)
mean prefernukes100, over(highvslowknowledge fullnuclearbalance), if (public==1 & gc==1) & (fullnuclearbalance==2 | fullnuclearbalance==4)
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_2
test [ prefernukes100 ]_subpop_3= [ prefernukes100 ]_subpop_4
graph bar prefernukes100 if (public==1 & gc==1) & (fullnuclearbalance==4 | fullnuclearbalance==2), over(fullnuclearbalance) over(highvslowknowledge) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))

*Comparing preference for nuclear use within public samples between high and low knowledge groups and across U.S. superiority and inferiority conditions using vignette exposure ITT (Figure 8B)
mean prefernukes100, over(highvslowknowledge vignette), if (public==1 & gc==1) & (vignette==2 | vignette==4)
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_2
test [ prefernukes100 ]_subpop_3= [ prefernukes100 ]_subpop_4
graph bar prefernukes100 if (public==1 & gc==1 & (vignette==2 | vignette==4)), over(vignette) over(highvslowknowledge) blabel(total, format(%9.0f)) legend(label(1 "Prefer Nuclear Use") label(2 "Approve Nuclear Use"))

*Relationship between knowledge, salience, identity, and support for nuclear use, controlling for individual-level characteristics (Figure 9 and Table A2)
logit prefernukes100 i.highknowledge i.cwgen i.postukraine i.elite i.race i.gender i.politics favordeathpenalty age if (public==1 & gc==1) | (elite==1 & uscitizen==1)
margins, dydx(*) post
estimates store A
outreg2 using appendixa2.doc, replace
logit approvenukes100 i.highknowledge i.cwgen i.postukraine i.elite i.race i.gender i.politics favordeathpenalty age if (public==1 & gc==1) | (elite==1 & uscitizen==1)
margins, dydx(*) post
estimates store B
outreg2 using appendixa2.doc, append
coefplot A, bylabel(Prefer Nukes) || B, bylabel(Approve Nukes) ||, keep(1.postukraine 1.highknowledge 1.elite 1.cwgen) xline(0) level(99 95) xlab(0.00 "0" -0.10 "-10" -0.20 "-20" -.30 "-30") 

*Percent respondents saying nuclear strike is ethical across different salience, knowledge, and identity sub-groups (Figure 10A)
mean ethicalnukesbinary100 if public==1 & gc==1 & postukraine==0
estimates store lowsaliencepublic
mean ethicalnukesbinary100 if public==1 & gc==1 & lowknowledge==1
estimates store lowknowledgepublic
mean ethicalnukesbinary100 if public==1 & gc==1 & (postukraine==1 | cwgen==1)
estimates store highsaliencepublic
mean ethicalnukesbinary100 if public==1 & gc==1 & highknowledge==1
estimates store highknowledgepublic
mean ethicalnukesbinary100 if elite==1 & uscitizen==1
estimates store elites

coefplot lowsaliencepublic lowknowledgepublic highsaliencepublic highknowledgepublic elites, recast(bar) vertical barwidth(.15) yscale(range(0(10)60)) ylabel(0(10)60) noci addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black))

*Proportion of respondents supporting nuclear use because of perceived military advantage across identity, salience, and knowlede groups
*Identifying number of individuals identifying "military advantage" as reason for supporting nuclear use across identity, salience, and knowledge groups
sum militaryadvantage if elite==1 
sum militaryadvantage if public==1 & gc==1 & lowknowledge==1 
sum militaryadvantage if public==1 & gc==1 & highknowledge==1
sum militaryadvantage if public==1 & gc==1 & cwgen==0
sum militaryadvantage if public==1 & gc==1 & cwgen==1
sum militaryadvantage if public==1 & gc==1 & postukraine==0
sum militaryadvantage if public==1 & gc==1 & postukraine==1

*Identifying size of respondent sub-groups across identity, salience, and knowledge groups
sum approvenukesq if elite==1 & uscitizen==1
sum approvenukesq if public==1 & gc==1 & lowknowledge==1
sum approvenukesq if public==1 & gc==1 & highknowledge==1
sum approvenukesq if public==1 & gc==1 & cwgen==0
sum approvenukesq if public==1 & gc==1 & cwgen==1
sum approvenukesq if public==1 & gc==1 & postukraine==0
sum approvenukesq if public==1 & gc==1 & postukraine==1

*Creating Figure 10B manually using data
*Using results from summary statistics generated above
gen miladvelite=(100*8/246)
gen miladvlowknowledgepublic=(100*114/581)
gen miladvhighknowledgepublic=(100*54/443)
gen miladvlowsalience=((100*(217+55))/(1242+263))
gen miladvhighsalience=((100*(122+284))/(1041+2020))
mean miladvelite
estimates store miladvelite
mean miladvlowknowledgepublic
estimates store miladvlowknowledgepublic
mean miladvhighknowledgepublic
estimates store miladvhighknowledgepublic
mean miladvlowsalience
estimates store miladvlowsalience
mean miladvhighsalience
estimates store miladvhighsalience
coefplot miladvlowsalience miladvlowknowledgepublic miladvhighsalience miladvhighknowledgepublic miladvelite, recast(bar) vertical yscale(range(0(5)25)) ylabel(0(5)25)noci addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black))

*Doing balance across sub-groups with military advantage
sum approvenukesq if elite==1 & uscitizen==1 & vignette==2
sum approvenukesq if elite==1 & uscitizen==1 & vignette==4
sum approvenukesq if elite==1 & uscitizen==1 & vignette==2 & approvenukesq>3
sum approvenukesq if elite==1 & uscitizen==1 & vignette==2 & approvenukesq<4
sum approvenukesq if elite==1 & uscitizen==1 & vignette==4 & approvenukesq>3
sum approvenukesq if elite==1 & uscitizen==1 & vignette==4 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & lowknowledge==1 & vignette==2
sum approvenukesq if public==1 & gc==1 & lowknowledge==1 & vignette==4
sum approvenukesq if public==1 & gc==1 & lowknowledge==1 & vignette==2 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & lowknowledge==1 & vignette==2 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & lowknowledge==1 & vignette==4 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & lowknowledge==1 & vignette==4 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & highknowledge==1 & vignette==2
sum approvenukesq if public==1 & gc==1 & highknowledge==1 & vignette==4
sum approvenukesq if public==1 & gc==1 & highknowledge==1 & vignette==2 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & highknowledge==1 & vignette==2 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & highknowledge==1 & vignette==4 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & highknowledge==1 & vignette==4 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & cwgen==0 & vignette==2
sum approvenukesq if public==1 & gc==1 & cwgen==0 & vignette==4
sum approvenukesq if public==1 & gc==1 & cwgen==0 & vignette==2 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & cwgen==0 & vignette==2 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & cwgen==0 & vignette==4 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & cwgen==0 & vignette==4 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & cwgen==1 & vignette==2
sum approvenukesq if public==1 & gc==1 & cwgen==1 & vignette==4
sum approvenukesq if public==1 & gc==1 & cwgen==1 & vignette==2 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & cwgen==1 & vignette==2 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & cwgen==1 & vignette==4 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & cwgen==1 & vignette==4 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & postukraine==0 & vignette==2
sum approvenukesq if public==1 & gc==1 & postukraine==0 & vignette==4
sum approvenukesq if public==1 & gc==1 & postukraine==0 & vignette==2 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & postukraine==0 & vignette==2 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & postukraine==0 & vignette==4 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & postukraine==0 & vignette==4 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & postukraine==1 & vignette==2
sum approvenukesq if public==1 & gc==1 & postukraine==1 & vignette==4
sum approvenukesq if public==1 & gc==1 & postukraine==1 & vignette==2 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & postukraine==1 & vignette==2 & approvenukesq<4
sum approvenukesq if public==1 & gc==1 & postukraine==1 & vignette==4 & approvenukesq>3
sum approvenukesq if public==1 & gc==1 & postukraine==1 & vignette==4 & approvenukesq<4

*Military Advantage Responses
sum militaryadvantage if elite==1 & uscitizen==1 & vignette==2 & approvenukesq>3
sum militaryadvantage if elite==1 & uscitizen==1 & vignette==4 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & lowknowledge==1 & vignette==2 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & lowknowledge==1 & vignette==4 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & highknowledge==1 & vignette==2 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & highknowledge==1 & vignette==4 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & cwgen==0 & vignette==2 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & cwgen==0 & vignette==4 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & cwgen==1 & vignette==2 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & cwgen==1 & vignette==4 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & postukraine==0 & vignette==2 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & postukraine==0 & vignette==4 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & postukraine==1 & vignette==2 & approvenukesq>3
sum militaryadvantage if public==1 & gc==1 & postukraine==1 & vignette==4 & approvenukesq>3

*Comparing Preference for Troops between Elite Sample and Low Salience (Pre-Ukraine) Public Sample Across Perceived Balances (Figure A10A)
mean prefertroops100, over(samplecodes fullnuclearbalance), if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)
test [ prefertroops100 ]_subpop_1= [ prefertroops100 ]_subpop_2
test [ prefertroops100 ]_subpop_3= [ prefertroops100 ]_subpop_4
graph bar prefertroops100 if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1), over(fullnuclearbalance) over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Troops") label(2 "Approve Troops"))

*Comparing Preference fo Troops between Elite Sample and Low Salience (Pre-Ukraine) Public Sample Across Vignettes (Figure A10B)
mean prefertroops100, over(samplecodes vignette), if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)
test [ prefertroops100 ]_subpop_1= [ prefertroops100 ]_subpop_2
test [ prefertroops100 ]_subpop_3= [ prefertroops100 ]_subpop_4
graph bar prefertroops100 if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1), over(vignette) over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Troops") label(2 "Approve Troops"))

*Comparing Approval for Troops between Elite Sample and Low Salience (Pre-Ukraine) Public Sample Across Perceived Balances (Figure A11A)
mean approvetroops100, over(samplecodes fullnuclearbalance), if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)
test [ approvetroops100 ]_subpop_1= [ approvetroops100 ]_subpop_2
test [ approvetroops100 ]_subpop_3= [ approvetroops100 ]_subpop_4
graph bar approvetroops100 if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1), over(fullnuclearbalance) over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Troops") label(2 "Approve Troops"))

*Comparing Approval for Troops between Elite Sample and Low Salience (Pre-Ukraine) Public Sample Across Vignettes (Figure A11B)
mean approvetroops100, over(samplecodes vignette), if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1)
test [ approvetroops100 ]_subpop_1= [ approvetroops100 ]_subpop_2
test [ approvetroops100 ]_subpop_3= [ approvetroops100 ]_subpop_4
graph bar approvetroops100 if (public==1 & gc==1 & postukraine==0) | (elite==1 & uscitizen==1), over(vignette) over(samplecodes) blabel(total, format(%9.0f)) legend(label(1 "Prefer Troops") label(2 "Approve Troops"))

*Comparing Preference for Troops between Elite Sample and High Salience (Post-Ukraine) Public Sample across Perceived Balances (Figure A12A)
mean prefertroops100, over(samplecodes fullnuclearbalance), if (public==1 & gc==1 & postukraine==1) | (elite==1 & uscitizen==1)
test [ prefertroops100 ]_subpop_1= [ prefertroops100 ]_subpop_2
test [ prefertroops100 ]_subpop_3= [ prefertroops100 ]_subpop_4
test [ prefertroops100 ]_subpop_3= [ prefertroops100 ]_subpop_5
test [ prefertroops100 ]_subpop_3= [ prefertroops100 ]_subpop_6
test [ prefertroops100 ]_subpop_4= [ prefertroops100 ]_subpop_5
test [ prefertroops100 ]_subpop_4= [ prefertroops100 ]_subpop_6
test [ prefertroops100 ]_subpop_5= [ prefertroops100 ]_subpop_6
graph bar prefertroops100 if (public==1 & gc==1 & postukraine==1) | (elite==1 & uscitizen==1), over(fullnuclearbalance, label(labsize(small))) ylabel(,labsize(small)) over(samplecodes) blabel(total, format(%9.0f)) 

*Comparing Preference for Troops between Elite Sample and High Salience (Post-Ukraine) Public Sample Across Vignettes (Figure A12B)
mean prefertroops100, over(samplecodes vignette), if (public==1 & gc==1 & postukraine==1) | (elite==1 & uscitizen==1)
test [ prefertroops100 ]_subpop_1= [ prefertroops100 ]_subpop_2
test [ prefertroops100 ]_subpop_3= [ prefertroops100 ]_subpop_4
test [ prefertroops100 ]_subpop_3= [ prefertroops100 ]_subpop_5
test [ prefertroops100 ]_subpop_3= [ prefertroops100 ]_subpop_6
test [ prefertroops100 ]_subpop_4= [ prefertroops100 ]_subpop_5
test [ prefertroops100 ]_subpop_4= [ prefertroops100 ]_subpop_6
test [ prefertroops100 ]_subpop_5= [ prefertroops100 ]_subpop_6
graph bar prefertroops100 if (public==1 & gc==1 & postukraine==1) | (elite==1 & uscitizen==1), over(vignette, label(labsize(small))) ylabel(,labsize(small)) over(samplecodes) blabel(total, format(%9.0f)) 

*Comparing Approval for Troops between Elite Sample and High Salience (Post-Ukraine) Public Sample Across Perceived Balances (Figure A13A)
mean approvetroops100, over(samplecodes fullnuclearbalance), if (public==1 & gc==1 & postukraine==1) | (elite==1 & uscitizen==1)
test [ approvetroops100 ]_subpop_1= [ approvetroops100 ]_subpop_2
test [ approvetroops100 ]_subpop_3= [ approvetroops100 ]_subpop_4
test [ approvetroops100 ]_subpop_3= [ approvetroops100 ]_subpop_5
test [ approvetroops100 ]_subpop_3= [ approvetroops100 ]_subpop_6
test [ approvetroops100 ]_subpop_4= [ approvetroops100 ]_subpop_5
test [ approvetroops100 ]_subpop_4= [ approvetroops100 ]_subpop_6
test [ approvetroops100 ]_subpop_5= [ approvetroops100 ]_subpop_6
graph bar approvetroops100 if (public==1 & gc==1 & postukraine==1) | (elite==1 & uscitizen==1), over(fullnuclearbalance, label(labsize(small))) ylabel(,labsize(small)) over(samplecodes) blabel(total, format(%9.0f)) 

*Comparing Approval for Troops between Elite Sample and High Salience (Post-Ukraine) Public Sample across Vignettes (Figure A13B)
mean approvetroops100, over(samplecodes vignette), if (public==1 & gc==1 & postukraine==1) | (elite==1 & uscitizen==1)
test [ approvetroops100 ]_subpop_1= [ approvetroops100 ]_subpop_2
test [ approvetroops100 ]_subpop_3= [ approvetroops100 ]_subpop_4
test [ approvetroops100 ]_subpop_3= [ approvetroops100 ]_subpop_5
test [ approvetroops100 ]_subpop_3= [ approvetroops100 ]_subpop_6
test [ approvetroops100 ]_subpop_4= [ approvetroops100 ]_subpop_5
test [ approvetroops100 ]_subpop_4= [ approvetroops100 ]_subpop_6
test [ approvetroops100 ]_subpop_5= [ approvetroops100 ]_subpop_6
graph bar approvetroops100 if (public==1 & gc==1 & postukraine==1) | (elite==1 & uscitizen==1),  over(vignette, label(labsize(small))) ylabel(,labsize(small)) over(samplecodes) blabel(total, format(%9.0f)) 

*Policy Preferences by Group (Table A3)
mean prefertroops100, over(group), if (public==1 & gc==1) | (elite==1 & uscitizen==1)
test [ prefertroops100 ]_subpop_1= [ prefertroops100 ]_subpop_2
test [ prefertroops100 ]_subpop_1= [ prefertroops100 ]Elite
test [ prefertroops100 ]_subpop_2= [ prefertroops100 ]Elite
mean approvetroops100, over(group), if (public==1 & gc==1) | (elite==1 & uscitizen==1)
test [ approvetroops100 ]_subpop_1= [ approvetroops100 ]_subpop_2
test [ approvetroops100 ]_subpop_1= [ approvetroops100 ]Elite
test [ approvetroops100 ]_subpop_2= [ approvetroops100 ]Elite
mean prefernukes100, over(group), if (public==1 & gc==1) | (elite==1 & uscitizen==1)
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]_subpop_2
test [ prefernukes100 ]_subpop_1= [ prefernukes100 ]Elite
test [ prefernukes100 ]_subpop_2= [ prefernukes100 ]Elite
mean approvenukes100, over(group), if (public==1 & gc==1) | (elite==1 & uscitizen==1)
test [ approvenukes100 ]_subpop_1= [ approvenukes100 ]_subpop_2
test [ approvenukes100 ]_subpop_1= [ approvenukes100 ]Elite
test [ approvenukes100 ]_subpop_2= [ approvenukes100 ]Elite
graph bar prefertroops100 approvetroops100 if (public==1 & gc==1) | (elite==1 & uscitizen==1), over(group) blabel(total, format(%9.0f)) legend(label(1 "Prefer Troops") label(2 "Approve Troops"))

*Distribution of Nuclear Knowledge Across Samples (Table A4)
mean nukeknowledge, over(group), if (public==1 & gc==1) | (elite==1 & uscitizen==1)
test [ nukeknowledge ]_subpop_1= [ nukeknowledge ]_subpop_2
test [ nukeknowledge ]_subpop_1= [ nukeknowledge ]Elite
test [ nukeknowledge ]_subpop_2= [ nukeknowledge ]Elite
tab nukeknowledge if public==1 & gc==1 & postukraine==0
tab nukeknowledge if public==1 & gc==1 & postukraine==1
tab nukeknowledge if elite==1 & uscitizen==1

*Distribution of Nuclear Knowledge Across Samples (Figure A9)
twoway histogram nukeknowledge if (public==1 & gc==1) | (elite==1 & uscitizen==1), discrete by(group, cols(1)) xlabel(0(1)5)

*Testing Relationship between Elite Status and Post-Ukraine Samples and Nuclear Knowledge
reg nukeknowledge elite postukraine if (public==1 & gc==1) | (elite==1 & uscitizen==1), r
